package main

import (
	"fmt"
	"unsafe"
)

func main() {
	var a byte = 65
	var b uint8 = 66
	fmt.Printf("a的值: %c \nb的值: %c\n", a, b)

	var a1 byte = 'A'
	var b1 uint8 = 'B'
	fmt.Printf("a的值: %c \nb的值: %c\n", a1, b1)

	var a2 byte = 'A'
	var b2 rune = 'B'
	fmt.Printf("a占用%d个字节数\nb占用%d个字节数\n", unsafe.Sizeof(a2), unsafe.Sizeof(b2))

	var mystr01 string = "hello"
	var mystr02 [5]byte = [5]byte{104, 101, 108, 108, 111}
	fmt.Printf("mystr01: %s\n", mystr01)
	fmt.Printf("mystr02: %s\n", mystr02)

	var country string = "hello,中国"
	fmt.Println(len(country))

	var mystr03 string = "\\r\\n"
	var mystr04 string = `\r\n`
	fmt.Println(mystr03)
	fmt.Println(mystr04)

	fmt.Print(`\r\n`)
	fmt.Printf("的解释型字符串是: %q\n", mystr04)

	var mystr05 string = `你好呀!
我的公众号是: Go编程时光，欢迎大家关注`
	fmt.Println(mystr05)
}
